import request from '@/utils/request'

export function getCategory(params) {
  return request({
    url: '/category/page',
    method: 'get',
    params
  })
}

export function addCategory(data) {
  return request({
    url: '/category',
    method: 'post',
    data
  })
}

export function editCategory(params) {
  return request({
    url: '/category',
    method: 'put',
    data
  })
}

export function deleCategory(ids) {
  return request({
    url: '/category',
    method: 'delete',
    params: { ids }
  })
}

